<?php echo $header;echo $sidebar ?>		
		<div class="span10 content">
			<?php echo $hugemenu ?>

            <h1><?php echo $title; ?></h1>
            <?php if ($message) { ?>
                <div class="alert alert-error">
                    <a class="close" data-dismiss="alert" href="#">x</a><?php echo $message; ?>
                </div>
            <?php } if ($success) { ?>
                <div class="alert alert-success">
                    <a class="close" data-dismiss="alert" href="#">x</a><?php echo $success; ?>
                </div>
            <?php } ?>
            <!--div class="alert alert-info"><?php echo lang('hrm_staffadd_message'); ?></div-->
		
<link rel="stylesheet" href="<?php echo base_url() ?>assets/admin/css/jquery-ui.css">
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="<?php echo base_url() ?>assets/admin/js/jquery-ui.js"></script>
	<script>
var addPicker;
var i = 1;
jQuery(function($) {

	$("#date").datepicker({dateFormat: 'yy-mm-dd'});
	
	addPicker = function(){
		
		var nextone = $(this).next().is('input');
		if (nextone==false) {
				$('#date-box').append('<input name="data[Vacation][date]['+i+']" class="date extra-date span12" type="text" id="date'+i+'">');
				$('#date'+i).datepicker({ dateFormat: 'yy-mm-dd'});
				$('#date'+i).change(addPicker);
				i = i+1;
		}
	};
	var fill_id = '<?php echo $fill_data->id ?>';
	if (fill_id == ''){
		$("#date").change(addPicker);
	}	
});
</script>

			<div class="contentArea">
				<div class="widget">
					<div class="widget-head"><h3 class="heading"><?php echo $sub_title; ?></h3></div>
					<?php echo form_open_multipart(current_url(), array('class' => 'form-horizontal')); ?>
                        <div class="widget-body">
                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="control-group">
										<label class="control-label"><?php echo lang('hrm_sidemenu_timesheet_add_form_field_user', 'User'); ?></label>
											<div class="controls">
												<?php
													$options = array();
														foreach ($this->data['userlist'] as $user):
															$options[$user->id] = $user->username;
														endforeach;
														$value = ($fill_data->id? $fill_data->user_id : set_value('user_id'));
														echo form_dropdown('user_id', $options, $value);
												?>
											</div>
										<br>							
										<label class="control-label"><?php echo lang('hrm_sidemenu_timesheet_add_form_field_status', 'Timesheet Status'); ?></label>
											<div class="controls">
												<?php
													$status_options = array();
													foreach ($this->data['statuslist'] as $status):
														$status_options[$status->id] = $status->name;
													endforeach;											
													$value = ($fill_data->id? $fill_data->approval_status_id : set_value('approval_status_id'));
													echo form_dropdown('approval_status_id', $status_options, $value);
												?>
											</div>
										<br>
										<label class="control-label"><?php echo lang('hrm_sidemenu_vacation_add_form_field_date', 'Date'); ?></label>
                                              <div class="controls" id="date-box">
                                                  <?php
                                                       $txtdate = array(
                                                         'name'        => 'data[Vacation][date][0]',
                                                         'id'          => 'date',
                                                         'value'       => ($fill_data->id? $fill_data->date : set_value('date')),
                                                         'maxlength'   => '20',
                                                         'size'        => '20',
                                                         'class'       => 'span12',
                                                       );
                                                       echo form_input($txtdate); 
                                                   ?>
                                               </div>
                                    </div>
                                    <div class="control-group">
                                        <label class="control-label"></label>
                                        <div class="controls">
                                            <?php echo form_submit('submit', ($fill_data->id ? lang('hrm_sidemenu_vacation_add_form_button_update') : lang('hrm_sidemenu_vacation_add_form_button_add') ), 'class="btn btn-success span5"'); ?>
                                        </div>
                                    </div>
                                    <?php /** ?>
                                    <div class="control-group">
                                        <label class="control-label"></label>
                                        <div class="controls">
                                            <?php echo form_submit('submit',($name['value']) ? lang('hrm_sidemenu_vacation_add_form_button_update') : lang('hrm_sidemenu_vacation_add_form_button_add'), 'class="btn btn-info span6"'); ?>
                                        </div>
                                    </div>   
                                    <?php */ ?>                                        
                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="id" id="id" value="<?php echo ($fill_data->id? $fill_data->id : 0 );?>"/>
					<?php echo form_close(); ?>	
				</div>
			</div>
        </div>
        <!--/content-->

<?php echo $footer ?>